﻿// /********************************************************
// *                                                       *
// *   Copyright (C) Microsoft. All rights reserved.       *
// *                                                       *
// ********************************************************/

using TelemetryService;

namespace ConsoleHost
{
    using System;
    using System.ServiceModel;
    using TelemetryService;

    class Program
    {
        static void Main()
        {
            ServiceHost host = new ServiceHost(typeof(MarkerService));
            try
            {
                host.Open();
                Console.WriteLine("Host is up and running...");
                Console.WriteLine("Press <enter> to exit...");
                Console.WriteLine();
                Console.ReadLine();
                host.Close();
            }
            catch (Exception e)
            { 
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine(e.Message);
                Console.ResetColor();
                host.Abort();
            }
        }
    }
}

